import os


def make_dir(path):
    if not os.path.exists(path):
        os.mkdir(path)


home_path = os.path.expanduser('~')
base_path = os.path.join(home_path, '.astock')
make_dir(base_path)
settings_path = os.path.join(base_path, 'setting')
make_dir(settings_path)
cache_path = os.path.join(base_path, 'cache')
make_dir(cache_path)
log_path = os.path.join(base_path, 'log')
make_dir(log_path)
download_path = os.path.join(base_path, 'download')
make_dir(download_path)
output_path = os.path.join(base_path, 'output')
make_dir(output_path)